﻿using Candy.Infrastructure;
using GalaSoft.MvvmLight.Threading;
using System.Windows.Controls;

namespace Candy
{
    public partial class ProgressReporterCtrl : UserControl, IProgressReporterControl
    {
        public ProgressReporterCtrl()
        {
            InitializeComponent();
        }

        public void Show()
        {
            DispatcherHelper.CheckBeginInvokeOnUI(() => progBar.Visibility = System.Windows.Visibility.Visible);  
        }

        public void Hide()
        {
            DispatcherHelper.CheckBeginInvokeOnUI(() => progBar.Visibility = System.Windows.Visibility.Collapsed);  
        }
    }
}
